import wyRequest from '../../../utils/http'


// 获取我的工单
export const getOneWorkOder = (status,data) => wyRequest.get(`/api/wap/work/staff/getOneWorkOder/${status}`,data)

// 获取我的喂食工单
export const getOneWorkOderFoods = (status,data) => wyRequest.get(`/api/wap/work/staff/getOneWorkOderFoods`,data)

// 获取个人信息
export const getInfo = () => wyRequest.get('/api/wap/work/staff/getInfo')

// 获取未完成的统计
export const getSubscript = () => wyRequest.get('/api/wap/work/staff/getSubscript')

// 获取未分配的工单（管理员)
export const getWork = (data) => wyRequest.get(`/api/wap/work/staff/getWork`,data)

// 分配页面获取管家
export const basicStaffOptions = () => wyRequest.get(`/api/wap/work/staff/basicStaffOptions`)

// 分配页面派发工单
export const distribute = (param: Record<string, any>) => wyRequest.post(`/api/wap/work/staff/distribute`,param)

// 猪圈下拉字典
export const basicPigstyOptions = (kind) => wyRequest.get(`/api/wap/work/staff/basicPigstyOptions/${kind}`)

// 提交入圈工单
export const addEnter = (data) => wyRequest.post(`/api/wap/work/staff/addEnter`,data)

// 录像接口
export const startVideo = (code) => wyRequest.get(`/api/wap/work/staff/feeding/${code}`)

// 获取已完成入圈工单
export const getEnterOder = (data) => wyRequest.get(`/api/wap/work/staff/getEnterOder`,data)

// 获取已完成喂食工单
export const getFoodOder = (data) => wyRequest.get(`/api/wap/work/staff/getFoodOder`,data)

// 提交喂养工单
export const referFeed = (data) => wyRequest.post(`/api/wap/work/staff/raiseV1`,data)

// 提交服务工单
export const referService = (data) => wyRequest.post(`/api/wap/work/staff/service`,data)

// 获取已完成的服务工单
export const finishService = (data) => wyRequest.post(`/api/wap/work/staff/finishService`,data)

// 提交治疗工单
export const submitTreatment = (data) => wyRequest.post(`/api/wap/work/staff/treatment`,data)

// 已完成的治疗工单
export const finishTreat = (data) => wyRequest.post(`/api/wap/work/staff/finishTreat`,data)

// 根据二标查询猪仔
export const getPig = (mac) => wyRequest.get(`/api/wap/work/staff/getPig/${mac}`)

// 获取治疗分类
export const getTreatKind = ()=> wyRequest.get(`/api/wap/work/staff/getTreatKind`)

// 添加喂养端账号
export const setAccount = (data) => wyRequest.post(`/api/wap/work/staff/setAccount`,data)

// 获取所有员工
export const getInfoList = () => wyRequest.get(`/api/wap/work/staff/getInfoList`)

// 获取我管理猪仔
export const getOneList = () => wyRequest.get(`/api/wap/work/staff/getOneList`)

// 获取全部工单 （管理员功能）
export const getListOrder = (data) => wyRequest.get(`/api/wap/work/staff/getListOrder`,data)

// 获取我的完成
export const getDetailJob = () => wyRequest.get(`/api/wap/work/staff/getDetailJob`)

// 停止录像
export const stop = (code) => wyRequest.get(`/api/wap/work/staff/stop/${code}`)

// 二进制图片上传
export const upImg  = () => wyRequest.post(`/api/wap/work/staff/form-data-image`)

// 退出登录
export const logout = () => wyRequest.post(`/api/wap/work/login/logout`)